Docker - Shere Images Across Daemons

| 1 min read

Export specific image

In case you have some specific docker images to export:

docker save "<docker image name>" -o <path>/<filename>.tar

for example:

docker save "ubuntu:18.04" -o ~/test.tar

Export all images

if you want to see the images you about to export.
for complete list:

docker images -q

for list in specific format (like ubuntu:18.04):

docker images --format "{{.Repository}}:{{.Tag}}"

then, when your'e okay with the list, run:

docker save $(docker images --format "{{.Repository}}:{{.Tag}}") -o <path>/<filename>.tar

for example:

docker save $(docker images --format "{{.Repository}}:{{.Tag}}") -o ~/test.tar

Import the .tar file

move the .tar file to the destination pc/server, then run:

docker load -i <path of the .tar file>

for example:

docker load -i /usr/yaki/test.tar